//UVA1193 Radar Installation:https://www.luogu.com.cn/problem/UVA1193

#include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;

const int N = 1010;

int n;
double d;

struct node
{
	double l;
	double r;
}a[N];


bool cmp(const node&n1,const node& n2)
{
	return n1.l < n2.l;
}

int main()
{
	int c= 1;
	while(scanf("%d%lf",&n,&d), (n != 0 || d != 0))
	{
		int flag = 1;

		for(int i = 0; i < n; i++)
		{
			double x,y;
			scanf("%lf%lf",&x,&y);
			if(y > d)
			{
				flag = 0;
				break;
			}
			double m = sqrt(d*d - y*y);
			a[i].l = x - m;
			a[i].r = x + m;
		}
		int ret = 1;
		if(flag == 0)
		{
			ret = -1;
		}
		else
		{
			sort(a,a+n,cmp);
			
			double r = a[0].r;
			
			for(int i = 1; i < n; i++)
			{
				double left = a[i].l;
				double right = a[i].r;
				if(left <= r)
				{
					r = min(right,r);
				}
				else
				{
					ret++;
					r = right;
				}
			}
			
		}

		printf("Case %d: %d\n",c,ret);	
		
		c++;
	}

	
	return 0;
}
